<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86151
  Date: 2023/4/8
  Time: 9:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p>welcome :${sessionScope.user.username}</p>
<hr>
<p><a href="/admin/goods.jsp">add goods</a> </p>
<table border="1">
    <tr>
        <td>name</td>
        <td>price</td>
        <td>produce</td>
        <td colspan="3">options</td>
    </tr>
<c:forEach var="good" items="${sessionScope.goods}">
    <tr>
        <td>${good.name}</td>
        <td>${good.price}</td>
        <td>${good.produce}</td>
        <td><a href="/goods/queryById/${good.id}">edit</a></td>
        <td><a href="/goods/removeById/${good.id}" >remove</a></td>
    </tr>
</c:forEach>
</table>

</body>
</html>
